Xbasic

COPY_FILES Function

Syntax

FilesCopied as C = Copy_Files(C SourceFolder ,C DestinationFolder ,C Filelist )

Arguments

FilesCopied

The list of files successfully copied.

SourceFolder

The name and path of a folder.

DestinationFolder

The name and path of a folder.

Filelist

A list of files relative to SourceFolder.

Description

Copy a list of files from one folder to another

Discussion

The COPY_FILES() function copies a list of files from a source folder to a destination folder. Filelist should be a list of files relative to SourceFolder. If there are subfolders within Filelist, they will be created. If the destination file exists, the user will be prompted to overwrite.

Example

dim lst as C
lst = filefind.get("c:\documents\temp\*.gif")
? copy_files("c:\documents\temp", "c:\temp", lst)
= comments.gif
DRAG_AND_DROP_LIST_BUTTON.GIF
ICON_INFORMATION.GIF
ICON_WARNING.GIF
...

See Also